﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using System.Configuration;

namespace Lapv
{
    public partial class Logout : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack) return;
            FormsAuthentication.SignOut();
            Response.Cookies[FormsAuthentication.FormsCookieName].Expires = DateTime.Now.AddDays(-1);
            Session.Clear();
            Response.Expires = 60;
            Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
            Response.Redirect(ConfigurationManager.AppSettings["DomainNews"].ToString() + "Login.aspx");
        }
    }
}
